#ifndef FINDREPLACEDIALOG_H
#define FINDREPLACEDIALOG_H

#include <QDialog>
#include <QTextDocument>
namespace Ui {
class FindReplaceDialog;
}

class FindReplaceDialog : public QDialog
{
    Q_OBJECT



signals:
    void findRequested(const QString &text, QTextDocument::FindFlags flags);
    void replaceRequested(const QString &text, const QString &replace, QTextDocument::FindFlags flags);
    void replaceAllRequested(const QString &text, const QString &replace, QTextDocument::FindFlags flags);

public:
    explicit FindReplaceDialog(QWidget *parent = nullptr);
    ~FindReplaceDialog();
    void setCurrentTab(int index);


private slots:
    void on_findNextButton_clicked();

    void on_replaceButton_clicked();

    void on_replaceAllButton_clicked();

private:
    Ui::FindReplaceDialog *ui;
    QTextDocument::FindFlags getFindFlags() const;
};

#endif // FINDREPLACEDIALOG_H
